<div  ng-init="initQuery()">
    <form class="form-horizontal" role="form" novalidate name="myForm">
      <div class="form-ctrl md-whiteframe-z1">
        <div class="form-search" style="height:250px;" ng-class="{'shou':!flag.state}">
          <div>
            <label>时间</label>
            <md-input-container flex>
              <label>开始时间</label>
              <input type="date" required name="startTime" ng-model="sendData.startTime" end-time="sendData.endTime" time-validate="day" />
              <div ng-messages="myForm.startTime.$error">
                <div ng-message="date">请正确输入时间</div>
                <div ng-message="time-error">开始时间不应大于结束时间</div>
                <div ng-message="too-great">结束时间不应大于当前时间</div>
              </div>
            </md-input-container>
          </div>
          <div>
            <md-input-container flex>
              <label>结束时间</label>
              <input type="date" required name="endTime" ng-model="sendData.endTime" start-time="sendData.startTime" time-validate="day" />
              <div ng-messages="myForm.endTime.$error">
                <div ng-message="date">请正确输入时间</div>
                <div ng-message="time-error">开始时间不应大于结束时间</div>
                <div ng-message="too-great">结束时间不应大于当前时间</div>
              </div>
            </md-input-container>
          </div>
          <div style="width: 250px;">
            <label>业务渠道</label>
            <md-select  ng-model="sendData.business" placeholder="移动自有渠道">
              <md-option ng-value="item.businessCode" ng-repeat="item in businessCodes">{{item.businessName}}</md-option>
            </md-select>
          </div>
          <div style="width: 250px;">
            <label>丢失场景</label>
            <md-select ng-model="sendData.lostScene" placeholder="B类报文丢失">
              <md-option ng-value="item.lostSceneCode" ng-repeat="item in lostSceneCodes">{{item.lostSceneName}}</md-option>
            </md-select>
          </div>
          <div style="width: 320px;">
            <label for="test" style="white-space:nowrap; width: 120px">发起方业务流水号</label>
              <md-input-container flex>
                <label>&nbsp;</label>
                <input type="text" maxlength="40" ng-model="sendData.serialNum">
              </md-input-container>
          </div>
        </div>
        <i class="glyphicon glyphicon-chevron-up shrinkage" ng-hide="myForm.$invalid || flag.arrow" ng-click="flag.state = false"></i>
        <md-button ng-disabled="myForm.$invalid" ng-click="search()" class="md-fab md-primary md-hue-1" aria-label="Profile">
          <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="!flag.state"></i>
          <i class="glyphicon glyphicon-search" ng-show="flag.state"></i>
        </md-button>
      </div>
    </form>
  </div>
  <div  ng-show="flag.show">
    <form action="{{exportUrl}}" target="_black" method="post">
      <input type='hidden' name="data" value='{{exportParam}}'>
      <md-button type="submit" class="md-raised">导出Excel</md-button>
    </form>
  </div>
  <div class="table-info" ng-show="flag.show">
    <div class="table-detail">
      <div class="t_r">
        <table class="table table-bordered " style="vertical-align: middle;">
          <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{title}}</caption>
          <thead>
            <tr>
              <th>时间</th>
              <th>业务渠道</th>
              <th>丢失场景</th>
              <th style="width:30%">发起方业务流水号</th>
              <th>报文详情</th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="item in items">
              <td>{{item.date | date:'yyyy/MM/dd'}}</td>
              <td>{{item.businessName}}</td>
              <td>{{item.lostSceneName}}</td>
              <td>{{item.serialNum}}</td>
              <td><a style="color: blue;cursor:pointer" ng-click="click(item)" data-target="#myModal" data-toggle="modal">查看报文详情</a></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <ds-page
        total-count="send.page.totalCount"
        page-size="send.page.pageSize"
        page-itmes="pageItems"
        param="send"
        current-page="send.page.currentPage"
        go-page="search(true)"
        show-max-page="5"
        first-text="<<"
        last-text=">>"
        previous-text="<"
        next-text=">">
    </ds-page>
  </div>

